<#-- propertyInfos, classInfo-->
package ${classInfo.pack};

<#list classInfo.importPackages as importPackage><#t>
import ${importPackage};
</#list><#t>

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

@Entity
public class ${classInfo.className} <#if classInfo.parentClassName?exists>extends ${classInfo.parentClassName}</#if>{
<#if classInfo.showIdProperty>

	private Integer id;
</#if>
<#list propertyInfos as propertyInfo><#t>

	private ${classInfo.getSimpleType(propertyInfo.type)} ${propertyInfo.name};
</#list><#t>
<#if classInfo.showIdProperty>

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
</#if>
<#list propertyInfos as propertyInfo><#t>

	<#if !propertyInfo.isTableColumn()><#t>
	@Transient
	<#elseif !propertyInfo.isSimpleObj()><#t>
		<#if classInfo.isList(propertyInfo)><#t>
	@OneToMany(targetEntity=${propertyInfo.genericType}.class,mappedBy="${classInfo.getMappedBy(propertyInfo)}",fetch=FetchType.LAZY)
		<#elseif classInfo.isEmbeddable(propertyInfo)><#t>
	@Embedded
		<#else><#t>
	@ManyToOne(targetEntity=${classInfo.getSimpleType(propertyInfo.type)}.class,fetch=FetchType.LAZY)
		</#if><#t>
	</#if><#t>
	public ${classInfo.getSimpleType(propertyInfo.type)} get${classInfo.capitalize(propertyInfo.name)}() {
		return ${propertyInfo.name};
	}
	public void set${classInfo.capitalize(propertyInfo.name)}(${classInfo.getSimpleType(propertyInfo.type)} ${propertyInfo.name}) {
		this.${propertyInfo.name} = ${propertyInfo.name};
	}
</#list><#t>
}